/*
 * @lc app=leetcode.cn id=796 lang=typescript
 *
 * [796] 旋转字符串
 */

// @lc code=start
function rotateString(s: string, goal: string): boolean {
    let a = s;
    do {
        if (a === goal) return true;
        a = a.substring(1) + a[0];
    } while (a !== s);
    return false;
}
// @lc code=end
